import { gql } from '@sb/webapp-api-client/graphql';

export const {{ camelCase name }}ListQuery = gql(/* GraphQL */ `
  query {{ camelCase name }}ListQuery {
    {{ camelCase name }}List(first: 100) {
      edges {
        node {
          id
          name
          ...{{ camelCase name }}ListItemFragment
        }
      }
    }
  }
`);

export const {{ camelCase name }}ListItemDeleteMutation = gql(/* GraphQL */ `
  mutation {{ camelCase name }}ListItemDeleteMutation($input: Delete{{ pascalCase name }}MutationInput!) {
    delete{{ pascalCase name }}(input: $input) {
      deletedIds
    }
  }
`);

export const {{ camelCase name }}ListItemFragment = gql(/* GraphQL */ `
  fragment {{ camelCase name }}ListItemFragment on {{ pascalCase name }}Type {
    id
    name
  }
`);
